<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Tienda</title>
</h:head>
<h:body>
	<h3>INGRESAR</h3>
	<center>

		<h:form id="formularioLogin">
			<table border="1" style="background: #80BFFF">
				<tr>
					<td colspan="2"><center>
							<p:outputLabel value="Login" />
						</center></td>
				</tr>
				<tr>
					<td><p:outputLabel for="nombre" value="Nombre" /></td>
					<td><p:inputText id="nombre" required="true"
							requiredMessage="*Se necesita un nombre"
							value="#{carritoMB.nombreUser}" /></td>
				</tr>
				<tr>
					<td><p:outputLabel for="nombre" value="Password " /></td>
					<td><p:password id="pass" value="#{carritoMB.passUser}"
							required="true" requiredMessage=" *Se necesita una password" /></td>
				</tr>
				<tr>
					<td colspan="2"><center>
							<h:commandButton value="Login" type="submit"
								action="#{carritoMB.verificarUser()}"
								process="@this :formularioLogin:nombre"
								update="formularioLogin:menGen" />

						</center></td>

				</tr>
			</table>
			<div style="width: 300px;">
				<p:messages id="menGen" />
			</div>
		</h:form>

		<h:form id="regresar">
			<h:commandLink value="[Back]" action="Carrito" />
		</h:form>


	</center>
</h:body>
</html>